home *** CD-ROM | disk | FTP | other *** search
- Path: informatik.tu-muenchen.de!fischerj
- From: fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer)
- Newsgroups: comp.sys.amiga.hardware,comp.sys.amiga.programmer
- Subject: Re: AUDIO INTERRUPTS!
- Date: 18 Apr 1996 15:33:46 GMT
- Organization: Technische Universitaet Muenchen, Germany
- Distribution: world
- Message-ID: <4l5ncq$let@sunsystem5.informatik.tu-muenchen.de>
- References: <4kdrpj$kvf@svin09.win.tue.nl> <1137.6674T1301T2851@lando.demon.co.uk> <4klthn$3rrb@trout.ab.umd.edu> <3174E32F.3490@fs1.ee.man.ac.uk>
- NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
- Originator: fischerj@hphalle5.informatik.tu-muenchen.de
-
-
- In article <3174E32F.3490@fs1.ee.man.ac.uk>, Christos Dimitrakakis <mbge4cd1@fs1.ee.man.ac.uk> writes:
- |> Hi.
- |> I have recently tried to create some real-time sound effects,
- |> (getting data from the parallel port and outputting to the sound chip)
- |> but I run into several problems.
- |>
- |> 1) I need to send data to the audio chip directly from the CPU.
- |> The hardware manual does not have an example about how to do this,
- |> and furthermore it does not state in where exactly the bytes are
- |> placed in the AUDxDAT registers.
- |> If you look at the register index, each AUDxDAT register
- |> occupies 6 memory locations. Where am I supposed to place data?
- |> Which address? Which part of each long word?
- |> 2)Interrupts
- |> I did this after enabling the interrupts,
- |> disabling audio DMA and specifying a volume for channel x:
- |>
- |> I. Send to AUDxDAT lower address (each byte stored in the LSBs of the
- |> first 2 words)
-
- doesn't seem to work. dma must be on. write into mem location.
-
- |> II. Wait for the interrupt
- |> III. Clear interrupt.
- |> IV. Go back to I.
- |> But it did not work...
- |> Somebody could help, either with a detailed explanation or
- |> a working example (preferrably in assembly)
-
- uhm, my lame workaround was this:
- set audio up to play a 2 bytes sample at max possible dma.
- take a byte from sampler, then make this (can't explain it other way :)
-
- move.b d0,d1 : rol.w #8,d0 : move.b d1,d0
-
- then store the word into the mem location.
-
- result: max 28/2 = 14khz :(
-
-
- my prob is that if dma is off, manipulating audXdat won't work.
- imho audXdat can be written by cpu, but is no use for anything
- because dma has to be active and the words load from mem interfer...
-
- Major prob is audio will make one interrupt and you have to
- load _2_ bytes from sampler in that time. ugh.
-
- brainstorming:
- set audio dma to ADR. set up interrupt.
- wait.
-
-
- audioint: get a sampler byte and put it into ADR.
- start timer to interrupt you for the next byte
- (i.e. 1/2 of the time between 2 audio ints).
- return
-
- timerint: get a sample byte and put it into ADR+1
- disable timerint (next int is to be done by audio again).
- return
-
- ADR dc.w 0
-
-
- |>
- |> Thanks in advance,
- |> Christos
- ------------------------------------------------------------------------
- fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) =:)
-
-